package lab01;

import java.util.Random;
import java.util.Scanner;

/**
 * Created by lenovo on 2017/9/29.
 */
public class Test08 {
    public static void main(String[] args) {
        int num=new Random().nextInt(100);
        Scanner sc=new Scanner(System.in);
        int input=0;
        do {
            System.out.println("请猜数字");
            input=sc.nextInt();
            if (input>num) {
                System.out.println("猜大咯");
            }
            else if (input<num){
                System.out.println("猜小咯");
            }
        }while(input!=num);
        System.out.println("猜对咯"+num);
    }

}
